package com.yxtbd.travel.travelvm.model.api

import okhttp3.OkHttpClient

/**
 * description ： travelRetrofitClient
 *
 * author : taodq
 * date : 2020/3/30 17:33
 */
object TravelRetrofitClient : BaseRetrofitClient() {

    val service by lazy { getService(TravelService::class.java, TravelService.BASE_URL) }

    override fun handleBuilder(builder: OkHttpClient.Builder) {

        builder.addInterceptor { chain ->
            var request = chain.request()
            val requestBuilder = request.newBuilder()
                .addHeader("Authorization", "Basic YXBwOmFwcA==")
                .build()
            chain.proceed(requestBuilder)
        }

    }

}